Skip to content

Add external dependencies analysis modularized as domain#538

Merged
JohT merged 5 commits intomainfrom
feature/externa-dependencies-domain
Mar 22, 2026
Merged

Add external dependencies analysis modularized as domain#538
JohT merged 5 commits intomainfrom
feature/externa-dependencies-domain

Conversation

@JohT
Copy link
Copy Markdown
Owner

@JohT JohT commented Mar 20, 2026

🚀 Feature

🛠 Fix

@JohT JohT self-assigned this Mar 20, 2026
@JohT JohT force-pushed the feature/externa-dependencies-domain branch from 736f153 to 47136c2 Compare March 21, 2026 15:32
@JohT JohT marked this pull request as ready for review March 22, 2026 08:26
@JohT JohT requested a review from Copilot March 22, 2026 08:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new external-dependencies “domain” (vertical-slice) that packages Cypher queries, CSV/Markdown report generation, and Python-based SVG chart generation for analyzing external dependency usage across Java and TypeScript artifacts.

Changes:

  • Introduces domains/external-dependencies/ with Cypher queries, a Markdown report template + assembler, and entry-point scripts for CSV/Python/Markdown compilation pipelines.
  • Adds a Python chart generator that renders pie/stacked-bar/scatter charts from Neo4j query results.
  • Adjusts executeQuery.sh to emit source-file references relative to the repository root.

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/executeQuery.sh Make “Source Cypher File” repo-root-relative
domains/external-dependencies/README.md Documents the new domain and prerequisites
domains/external-dependencies/externalDependenciesCsv.sh CSV report entry point for the domain
domains/external-dependencies/externalDependenciesMarkdown.sh Markdown report entry point (delegates to summary)
domains/external-dependencies/externalDependenciesPython.sh Python chart generation entry point
domains/external-dependencies/externalDependencyCharts.py Generates SVG charts from Neo4j query data
domains/external-dependencies/explore/ExternalDependenciesTypescript.ipynb Exploratory notebook (not pipeline-executed)
domains/external-dependencies/summary/externalDependenciesSummary.sh Assembles Markdown report + embeds includes
domains/external-dependencies/summary/report.template.md Markdown report template with include markers
domains/external-dependencies/queries/Remove_external_type_and_annotation_labels.cypher Utility query to remove external labels
domains/external-dependencies/queries/List_external_Java_types_used.cypher Stats query for labeled external Java types
domains/external-dependencies/queries/Label_external_types_and_annotations.cypher Labels external Java types/annotations
domains/external-dependencies/queries/External_package_usage_overall.cypher Java external package usage (overall)
domains/external-dependencies/queries/External_second_level_package_usage_overall.cypher Java 2nd-level package usage (overall)
domains/external-dependencies/queries/External_package_usage_spread.cypher Java external package spread stats
domains/external-dependencies/queries/External_second_level_package_usage_spread.cypher Java 2nd-level package spread stats
domains/external-dependencies/queries/External_package_usage_per_type.cypher Java external usage per internal type
domains/external-dependencies/queries/External_package_usage_per_type_distribution_with_annotations.cypher Java per-type distribution (incl annotations)
domains/external-dependencies/queries/External_package_usage_per_artifact.cypher Java per-artifact external usage
domains/external-dependencies/queries/External_package_usage_per_artifact_sorted.cypher Java per-artifact external usage (sorted)
domains/external-dependencies/queries/External_package_usage_per_artifact_sorted_top.cypher Java per-artifact top view (sorted)
domains/external-dependencies/queries/External_package_usage_per_artifact_distribution.cypher Java per-artifact distribution summary
domains/external-dependencies/queries/External_package_usage_per_artifact_package_aggregated.cypher Java per-artifact aggregated stats
domains/external-dependencies/queries/External_package_usage_per_artifact_and_package.cypher Java per-artifact/per-package breakdown
domains/external-dependencies/queries/External_package_usage_per_artifact_and_package_with_annotations.cypher Same, incl annotations
domains/external-dependencies/queries/External_package_usage_per_artifact_and_external_package.cypher Java per-artifact/per-external-package
domains/external-dependencies/queries/External_second_level_package_usage_per_artifact_and_external_package.cypher Java per-artifact/per-2nd-level external package
domains/external-dependencies/queries/External_package_usage_per_internal_package_count.cypher Java internal package count rollup
domains/external-dependencies/queries/External_types_per_artifact_using_requires.cypher Java external types per artifact via REQUIRES
domains/external-dependencies/queries/External_package_levels.cypher External package “level” stats
domains/external-dependencies/queries/External_package_name_elements.cypher External package name segment stats
domains/external-dependencies/queries/External_module_usage_overall_for_Typescript.cypher TS external module usage (overall)
domains/external-dependencies/queries/External_namespace_usage_overall_for_Typescript.cypher TS external namespace usage (overall)
domains/external-dependencies/queries/External_module_usage_spread_for_Typescript.cypher TS external module spread stats
domains/external-dependencies/queries/External_namespace_usage_spread_for_Typescript.cypher TS external namespace spread stats
domains/external-dependencies/queries/External_module_usage_per_internal_module_sorted_for_Typescript.cypher TS per-internal-module breakdown (sorted)
domains/external-dependencies/queries/External_namespace_usage_per_internal_module_sorted_for_Typescript.cypher TS per-internal-module namespace breakdown
domains/external-dependencies/queries/External_module_usage_per_internal_module_aggregated_for_Typescript.cypher TS per-internal-module aggregated stats
domains/external-dependencies/queries/External_module_usage_per_internal_module_distribution_for_Typescript.cypher TS per-internal-module distribution
domains/external-dependencies/queries/List_external_modules_resolved_to_internal_ones_for_Typescript.cypher TS resolved external→internal module stats
domains/external-dependencies/queries/Maven_POMs_and_their_declared_dependencies.cypher Maven declared dependency extraction
domains/external-dependencies/queries/Package_json_dependencies_occurrence.cypher package.json dependency occurrence stats
domains/external-dependencies/queries/Package_json_dependencies_by_package.cypher package.json dependencies per package
domains/external-dependencies/queries/Package_json_dependencies_combinations.cypher package.json dependency combinations
domains/external-dependencies/queries/Package_json_dependencies_combinations_with_versions.cypher combinations incl version specifiers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread domains/external-dependencies/externalDependencyCharts.py Outdated
@JohT JohT force-pushed the feature/externa-dependencies-domain branch 2 times, most recently from 3f0f93c to a06c4bb Compare March 22, 2026 09:00
@JohT JohT requested a review from Copilot March 22, 2026 09:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 49 out of 49 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread domains/external-dependencies/externalDependencyCharts.py Outdated
Comment thread domains/external-dependencies/queries/External_package_usage_overall.cypher Outdated
@JohT JohT force-pushed the feature/externa-dependencies-domain branch from 6b9c3c1 to 8aa223c Compare March 22, 2026 11:29
@JohT JohT force-pushed the feature/externa-dependencies-domain branch from f374ad6 to 22eb515 Compare March 22, 2026 13:57
@JohT JohT force-pushed the feature/externa-dependencies-domain branch from 22eb515 to f036e6a Compare March 22, 2026 14:01
@JohT JohT requested a review from Copilot March 22, 2026 14:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 52 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

domains/external-dependencies/queries/List_external_modules_resolved_to_internal_ones_for_Typescript.cypher:17

  • totalModuleCount / totalExternalModuleCount are computed via COUNT { ... }, which counts matching paths and can over-count when an external module resolves to multiple internal modules (or when duplicate relationships exist). This can skew the percentages and can also lead to division-by-zero when project is null (optional match) and the pattern count becomes 0. Consider counting distinct nodes (e.g., count(DISTINCT modules) / count(DISTINCT ext)) and guarding the percentage calculations for a 0 denominator (or filtering out null projects).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CHANGELOG.md
@JohT JohT merged commit d17e163 into main Mar 22, 2026
15 of 17 checks passed
@JohT JohT deleted the feature/externa-dependencies-domain branch March 22, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants